package KASystem;

import java.io.Serializable;

/**
 * This is my class =)
 *gf
 * @author Robbie
 */
class Hotel implements Serializable {

    //Creating fields for price option for hotel...
    private int singlePrice;
    private int doublePrice;
    private int additionPrice;
    //Creating fields for name and descrition...
    String name;
    String description;

    public Hotel(String n, String d, int sp, int dp) {
        doublePrice = dp;
        singlePrice = sp;
        additionPrice = 0;
        name = n;
        description = d;
    }
//getPrice Method. 

    public int getPrice(Participant p) {
        int finalPrice = singlePrice;
        if (p.hasCompanion()) {
            finalPrice = doublePrice;
        }
        if (p.getRoomOption()) {
            finalPrice += additionPrice;
        }

        return finalPrice;
    }
// setAdditionPrice method

    public void setAdditionPrice(int ap) {
        additionPrice = ap;
    }
    
    public int getAdditionPrice(){
        return additionPrice;
    }
    
// here i ll return name of hotels...

    public String getName() {
        return name;
    }
    
    public String toString() {
        return name + ": " + description + " |" + singlePrice + "/" + doublePrice + " + " + additionPrice;
    }
    //here i ll return description of hotel...

    public String getDescription() {
        return description;
    }
}
